<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改日程任务')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-sms-edit" th:object="${sysSms}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label">短信内容：</label>
                <div class="col-sm-8">
                    <textarea name="smsContext" th:readonly="true" class="form-control">[[*{smsContext}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">参会人：</label>
                <div class="col-sm-8">
                    <textarea name="smsPerson" th:readonly="true" class="form-control">[[*{smsPerson}]]</textarea>
                </div>
            </div>

            <div class="form-group">    
                <label class="col-sm-3 control-label">启用状态：</label>
                <div class="col-sm-8">

                    <select name="isEnable" class="form-control" disabled>
                        <option value="0" th:selected="*{isEnable}">未启用</option>
                        <option value="1" th:selected="*{isEnable}">启用</option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">是否发送：</label>
                <div class="col-sm-8">
                    <select name="isEnable" class="form-control" disabled>
                        <option value="0" th:selected="*{isSend}">未发送</option>
                        <option value="1" th:selected="*{isSend}">已发送</option>
                    </select>
                </div>
            </div>

            <div class="form-group">    
                <label class="col-sm-3 control-label">短信发送时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="sendDate" th:value="${#dates.format(sysSms.sendDate, 'yyyy-MM-dd HH:ss')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "system/sms";
        $("#form-sms-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-sms-edit').serialize());
            }
        }



        $("input[name='sendDate']").datetimepicker({
            dateFormat: 'yyyy-mm-dd',//日期显示格式
            timeFormat:'HH:mm',//时间显示格式
            todayBtn:  1,
            autoclose: 1,
            minView:0,  //0表示可以选择小时、分钟   1只可以选择小时
            minuteStep:1,//分钟间隔1分钟
            // format: "yyyy-mm-dd HH:ss",
            // minView: "hour",
            autoclose: true
        });
    </script>
</body>
</html>